﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SD.Libs.Navigation.Contracts;
using TestRunner.Base;
using TestRunner.Common;

namespace TestRunner.ViewModel
{
    public class MainPageVM : MyVMBase
    {

        #region fields

        private INavigationService _navigationService;

        #endregion fields

        #region properties

        private RelayCommand _goToPage2Command;

        public RelayCommand GoToPage2Command
        {
            get {
                return _goToPage2Command; 
                }
            
        }

        #endregion properties


        #region constructor

        public MainPageVM(INavigationService navigationService)
        {
            if (IsInDesignMode)
            {
            }
            else
            {                
                _navigationService = navigationService;                
                initializeCommands();
            }
        }


        #endregion constructor

        #region methods

        void initializeCommands()
        {
            _goToPage2Command = new RelayCommand(
                                                    () =>
                                                        {
                                                            _navigationService.NavigateTo(NavigationHelper.Page2);
                                                        }
                                                    ,
                                                    null
                                                );


        }

        #endregion methods

    }
}
